package com.yyfax.pay.common.enums;

import org.apache.commons.lang3.StringUtils;

import com.yyfax.framework.yyfax.enums.YesNoEnum;

/**
 * 富友存管协议签约状态枚举
 * 
 * @author buyi
 * @date 2018-06-27 15:48:55
 * @since v2.2.2
 */
public enum FuiouDepositProtocolSignStateEnum {
	/** 已生效*/
	EFFECTIVE("0"),
	
	/**　未生效*/
	INEFFECTIVE("1"),
	
	/** 已解约*/
	CANCELLED("2");
	
	private String value;

	private FuiouDepositProtocolSignStateEnum(String value) {
		this.value = value;
	}

	public String getValue() {
		return value;
	}
	
	public boolean isValue(String value){
		return StringUtils.equals(getValue(), value);
	}
	
	public static YesNoEnum fromValue(String value){
		if(EFFECTIVE.isValue(value)){
			//如果状态已生效，则返回yes
			
			return YesNoEnum.YES;
		}
		
		return YesNoEnum.NO;
	}

	
	
}
